package level.editor.main;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import level.editor.command.Command;

public class HotkeyAction extends AbstractAction
{
	private Command command;
	private LevelView view;
	
	public HotkeyAction(LevelView view, Command command)
	{
		this.view = view;
		this.command = command;
	}

	@Override
	public void actionPerformed(ActionEvent e)
	{
		if (view != null)
		{
			view.pushUpCommand(command);
		}
		else
			System.out.println("NULL VIEW");
	}

}
